package threadDemo.threadPool;

import java.util.concurrent.Callable;

public class CallablePool implements Callable<Integer>{

	private int a;
	
	public CallablePool(int a) {
		this.a = a;
	}
	
	@Override
	public Integer call() throws Exception {
		int sum = 0;
		for(int i=1;i<=a;i++) {
			sum = sum+i;
		}
		return sum;
	}

	
}
